<?php

declare(strict_types=1);

namespace App\Resource\Activity\NewUserGift\Game;

use Illuminate\Http\Resources\Json\JsonResource;

class Resource extends JsonResource
{
    public function toArray($request): ?array
    {
        if (empty($this->id)) {
            return null;
        }
        return [
            'id'    => $this->id,
            'play'  => $this->play,
            'plays' => $this->plays,
        ];
    }
}
